const htmlwebpackplugin=require('html-webpack-plugin')

module.exports={
//页面入口文件配置
    entry:__dirname+'/src/main.js',
    //入口文件输出配置
    output:{
        path:__dirname+'/dist',
        filename:'bundle.js'
    },
    module:{
        rules:[
            {
                test:/\.vue$/,
                use:'vue-loader'
            },
            {
                test:/\.css$/,
                use:['style-loader','css-loader']
            },
            {
            test:/\.(jpg|png|ttf|jpeg)$/,
                use:'url-loader'
            },
            {
                test:/\.js$/,
                use:'babel-loader',
                exclude:/node_modules/
            }
        ]
    },
    plugins:[
        new htmlwebpackplugin({
            template:'./src/index.html',
           filename:'index.html'

        })
    ]
};




























